{extend name="public/base" /}
{block name="body"}
<div class="layui-fluid">
    <div class="layui-row">
        <div class="layui-col-sm12 layui-col-md12 layui-col-lg12">
			<div class="widget-head">
				<div class="widget-title">{$title}</div>
			</div>
			<div class="widget-body layui-col-lg12">
				<form id="my-form" class="layui-form" method="post">
					<div class="layui-form-item">
						<label class="layui-form-label form-require">用户角色</label>
						<div class="layui-input-block">
							<select name="role">
								<option value="0">选择角色</option>
								{volist name="role" id="item"}
                        		<option value="{$item.id}" {if condition="$info['role'] eq $item.id"}selected="selected"{/if}>{$item.name}
                        		</option>
                        		{/volist}
							</select>
						</div>
					</div> 
					<div class="layui-form-item">
						<label class="layui-form-label form-require">用户名</label>
						<div class="layui-input-block" style="line-height: 38px">
							{empty name="info.username"}
							<input type="text" class="layui-input" name="username" value="" placeholder="请输入用户名" required>
							{else/}
							{$info.username}
							{/empty}
						</div>
					</div>					
					<div class="layui-form-item">
						<label class="layui-form-label form-require">密码</label>
						<div class="layui-input-block">
							<input type="password" class="layui-input" name="password" value="" placeholder="请输入密码">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label form-require">确认密码</label>
						<div class="layui-input-block">
							<input type="password" class="layui-input" name="repassword" value="" placeholder="请输入再次输入密码">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">昵称</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" name="nickname" value="{$info.nickname}" placeholder="请输入昵称">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">邮箱</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" name="email" value="{$info.email}" placeholder="请输入邮箱">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">手机</label>
						<div class="layui-input-block">
							<input type="text" class="layui-input" name="mobile" value="{$info.mobile}" placeholder="请输入手机">
						</div>
					</div>
					<div class="layui-form-item">
						<label class="layui-form-label">状态</label>
						<div class="layui-input-block">
							<input type="radio" name="status" value="1" title="是" {eq name="info['status']" value="1"}checked{/eq}>
                    		<input type="radio" name="status" value="0" title="否" {eq name="info['status']" value="0"}checked{/eq}>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-block">
							<input type="hidden" name="id" value="{$info.id}">
							<button class="layui-btn" lay-filter="*" lay-submit="">保存</button>
                    		<button class="layui-btn layui-btn-primary" onclick="javascript:history.back(-1);return false;">返回</button>
						</div>						
					</div>
				</form>
			</div>			
		</div>
    </div>
</div>
{/block}